<template name='user_astrict'>

<view class="box-infos font13  " >
	<view class="content-box">
		<view class="top-but">
			<view class="top-but-box background-fff">
				<text selectable="true"   class="tipss ">系统设置中心</text>
				<view @click="$common.noMultipleClicks('config_export',config_export)" class="rightButttom"  >
					<img src="../../static/img/update.png" class="ico"></img>
					刷新配置
				</view>
			</view>
		</view>
		<!-- 商品信息-右边 -->
		<view class=" menu-scroll boxsss " >
			<view class="box-list"  v-if="resData.data.adminConfigShow">
				<view class="title">
					<text selectable="true"  class="justify ">其他站点数据</text>
					<view class="tipss">
						对其他站点的数据进行操作
					</view>
					<view class="rightButttom" @click="$refs.firmList.open()">打开管理</view>
				</view>
			</view>
			
			<!-- 新增仓库 -->
			<view class="box-list" v-if="resData.data.adminConfigShow">
				<!-- 功能 -->
				<view class="title">
					<text selectable="true"  class="justify ">新增仓库</text>
					<view class="tipss">
						新增仓库...
					</view>
					<view class="rightButttom" @click="$common.noMultipleClicks('fun_addFirm',fun_addFirm)">新增</view>
				</view>
				<!-- end -->
				
				<!-- 内容 -->
				<view class="contentBox">
					<view class="settingLeftTitle">仓库appid：<text>用户登录的时候需要输入的ID</text></view>
					<input class="ipu" placeholder="请输入内容" placeholder-class="placeholder-class" v-model="addFirm.appids"/>
				</view>
				<view class="contentBox">
					<view class="settingLeftTitle">仓库名称：<text>新增仓库的名称</text></view>
					<input class="ipu" placeholder="请输入内容" placeholder-class="placeholder-class" v-model="addFirm.name"/>
				</view>
				<view class="contentBox">
					<view class="settingLeftTitle">管理员账号：<text>新增仓库的超级管理员的登录账号</text></view>
					<input class="ipu" placeholder="请输入内容" placeholder-class="placeholder-class" type="number" v-model="addFirm.adminName"/>
					
				</view>
				<view class="contentBox">
					<view class="settingLeftTitle">管理员密码：<text>新增仓库的超级管理员的登录密码</text></view>
					<input class="ipu" placeholder="请输入内容" placeholder-class="placeholder-class" v-model="addFirm.adminPassword" type="password"/>
				</view>
				
			</view>
			<!-- end -->
			
			<!-- 淘宝联盟 -->
			<view class="box-list" v-if="resData.data.adminConfigShow">
				<!-- 功能 -->
				<view class="title">
					<text selectable="true"  class="justify ">淘宝联盟信息设置</text>
					<view class="tipss">
						通过商品名称进行获取相似商品的图片
					</view>
					<view class="rightButttom" @click="$common.noMultipleClicks('fun_taobao',fun_taobao)">保存</view>
				</view>
				<!-- end -->
				
				<!-- 内容 -->
				<view class="contentBox">
					<view class="settingLeftTitle">AppKey：<text>登录淘宝联盟后台获取</text></view>
					<input class="ipu" placeholder="请输入内容,类似:35061****" placeholder-class="placeholder-class" v-model="taobao.tb_appKey"/>
				</view>
				
				<view class="contentBox">
					<view class="settingLeftTitle">appSecret：<text>登录淘宝联盟后台获取</text></view>
					<input class="ipu" placeholder="请输入内容,类似:004e8584b240******3bd144e3c0f1bc" placeholder-class="placeholder-class" v-model="taobao.tb_appSecret"/>
					
				</view>
				<view class="contentBox">
					<view class="settingLeftTitle">adzoneId：<text>你的广告位ID</text></view>
					<input class="ipu" placeholder="请输入内容,类似:116060350424" placeholder-class="placeholder-class" type="number" v-model="taobao.tb_adzoneId"/>
				</view>
			</view>
			<!-- end -->

			<!-- 阿里云商品图片识别 -->
			<view class="box-list" v-if="resData.data.adminConfigShow">
				<!-- 功能 -->
				<view class="title">
					<text selectable="true"  class="justify ">阿里云商品商品图像识别设置</text>
					<view class="tipss">
						用户在手机端通过图识物功能用到此设置
					</view>
					<view class="rightButttom" @click="$common.noMultipleClicks('fun_aliyun',fun_aliyun)">保存</view>
				</view>
				<!-- end -->
				
				<!-- 内容 -->
				<view class="contentBox">
					<view class="settingLeftTitle">accessKeyId：<text>阿里云的账号accessKeyId</text></view>
					<input class="ipu" placeholder="请输入内容,类似:35061****" placeholder-class="placeholder-class" v-model="aliyun.aly_accessKeyId"/>
				</view>
				
				<view class="contentBox">
					<view class="settingLeftTitle">accessKeySecret：<text>阿里云的账号accessKeySecret</text></view>
					<input class="ipu" placeholder="请输入内容,类似:004e8584b240******3bd144e3c0f1bc" placeholder-class="placeholder-class" v-model="aliyun.aly_accessKeySecret"/>
					
				</view>
				<view class="contentBox">
					<view class="settingLeftTitle">regionId：<text>实例的区域ID，例如您购买的实例区域为杭州，则更换为cn-hangzhou</text></view>
					<input class="ipu" placeholder="请输入内容,类似:116060350424" placeholder-class="placeholder-class"  v-model="aliyun.aly_regionId"/>
				</view>
				<view class="contentBox">
					<view class="settingLeftTitle">instanceName：<text>图像搜索实例名称，注意是实例名称不是实例ID。购买后通过上云层管控台实例信息一栏查看：</text></view>
					<input class="ipu" placeholder="请输入内容,类似:116060350424" placeholder-class="placeholder-class" v-model="aliyun.aly_instanceName"/>
				</view>
			</view>
			<!-- 百度云商品图片识别 -->
			<view class="box-list" v-if="resData.data.adminConfigShow">
				<!-- 功能 -->
				<view class="title">
					<text selectable="true"  class="justify ">百度云商品商品图像识别设置</text>
					<view class="tipss">
						用于小程序的商品扫描识别功能，配置此功能需每个商品多角度拍摄高清图片上传方可
					</view>
					<view class="rightButttom" @click="$common.noMultipleClicks('fun_baidu',fun_baidu)">保存</view>
				</view>
				<!-- end -->
				<!-- 内容 -->
				<view class="contentBox">
					<view class="settingLeftTitle">AppID：<text>百度云路径:图像搜索-应用列表</text></view>
					<input class="ipu" placeholder="请输入内容" placeholder-class="placeholder-class" v-model="baidu.app_id"/>
					
				</view>
				<view class="contentBox">
					<view class="settingLeftTitle">API Key：<text>百度云路径:图像搜索-应用列表</text></view>
					<input class="ipu" placeholder="请输入内容" placeholder-class="placeholder-class" v-model="baidu.app_key"/>
				</view>
				<view class="contentBox">
					<view class="settingLeftTitle">Secret Key：<text>百度云路径:图像搜索-应用列表</text></view>
					<input class="ipu" placeholder="请输入内容" placeholder-class="placeholder-class" v-model="baidu.app_secret"/>
				</view>
				
				<view class="contentBox">
					<view class="settingLeftTitle">商品相似度值：<text>用户拍摄的照片跟商品照片相似度；相似度可输入1-100；相似度越大则越精准反之同理；</text></view>
					<input class="ipu" placeholder="请输入内容" placeholder-class="placeholder-class" v-model="baidu.score"/>
				</view>
			</view>


			<!-- deepseek 深度求索 -->
			<view class="box-list" v-if="resData.data.adminConfigShow">
				<!-- 功能 -->
				<view class="title">
					<text selectable="true"  class="justify ">deepseek深度求索设置</text>
					<view class="tipss">
						用于Ai智能识别商品分类
					</view>
					<view class="rightButttom" @click="$common.noMultipleClicks('fun_deepseek',fun_deepseek)">保存</view>
				</view>
				<!-- end -->
				<!-- 内容 -->
				<view class="contentBox">
					<input class="ipu" placeholder="请输入deepseek的apiKey" placeholder-class="placeholder-class" v-model="deepseek.key"/>
				</view>
				<!-- end -->
			</view>
			<!-- end -->
			<!-- 腾讯地图设置 -->
			<view class="box-list" v-if="resData.data.adminConfigShow">
				<!-- 功能 -->
				<view class="title">
					<text selectable="true"  class="justify ">腾讯地图设置</text>
					<view class="tipss">
						用于标记客户地图位置，选择客户位置
					</view>
					<view class="rightButttom" @click="$common.noMultipleClicks('fun_lbs',fun_lbs)">保存</view>
				</view>
				<!-- end -->
				<!-- 内容 -->
				<view class="contentBox">
					<view class="settingLeftTitle">Key：<text>需要将apis.map.qq.com加入到小程序的信任列表中；保存后需刷新网页方可</text></view>
					<input class="ipu" placeholder="请输入内容" placeholder-class="placeholder-class" v-model="lbs.key"/>
				</view>
				<!-- end -->
			</view>
			<!-- end -->

			<!-- end -->
			<!-- 无登陆不可浏览 -->
			<view class="box-list">
				<view class="title">
					<text selectable="true"  class="justify ">游客账号可以浏览商品</text>
					<view class="tipss">
						游客账号可以浏览商品，但是不能查看价格;（默认不可浏览）
					</view>
					<switch
					@change="(val)=>{request('goodsBrowse',val.detail.value==false? 0:1)}"
					:checked="goods_browse==1" class="centers "
					/>
				</view>
			</view>
			<!-- end -->
			
			<!-- 名片广场 -->
			<view class="box-list">
				<view class="title">
					<text selectable="true"  class="justify ">名片广场功能</text>
					<view class="tipss">
						开启名片广场后用户可以自行发布名片，但需要后台管理人员进行审核通过方可。（默认关闭）
					</view>
					<switch
					@change="(val)=>{request('adCardSwitch',val.detail.value==false? 0:1)}"
					:checked="adCardSwitch==1" class="centers "
					/>
				</view>
			</view>
			<!-- end -->
			<!-- 广告动态 -->
			<view class="box-list">
				<view class="title">
					<text selectable="true"  class="justify ">社区动态</text>
					<view class="tipss">
						开启社区动态后用户可以自行发布动态内容，但需要后台管理人员进行审核通过方可。（默认关闭）
					</view>
					<switch
					@change="(val)=>{request('advertisementSwitch',val.detail.value==false? 0:1)}"
					:checked="advertisementSwitch==1" class="centers "
					/>
				</view>
			</view>
			<!-- end -->
			
			<!-- 广告动态 -->
			<view class="box-list">
				<view class="title">
					<text selectable="true"  class="justify ">换群功能</text>
					<view class="tipss">
						开启换群功能后用户可以自行发布群二维码，但需要后台管理人员进行审核通过方可。（默认关闭）
					</view>
					<switch
					@change="(val)=>{request('adGroupSwitch',val.detail.value==false? 0:1)}"
					:checked="adGroupSwitch==1" class="centers "
					/>
				</view>
			</view>
			<!-- end -->
			<!-- 游客账号显示价格 -->
			<view class="box-list">
				<view class="title">
					<text selectable="true"  class="justify ">游客账号显示零售价格</text>
					<view class="tipss">
						游客账号可查看零售价格，但仍受限于【游客账号可以浏览商品】权限。如果【游客账号可以浏览商品】权限关闭，则游客亦无法查看价格;（默认不显示）
					</view>
					<switch
					@change="(val)=>{request('goodsBrowseShowMoney',val.detail.value==false? 0:1)}"
					:checked="goodsBrowseShowMoney==1" class="centers "
					/>
				</view>
			</view>
			<!-- end -->
			<!-- 用户注册审核功能 -->
			<view class="box-list">
				<view class="title">
					<text selectable="true"  class="justify ">用户自助注册账号审核功能</text>
					<view class="tipss">
						关闭用户注册审核功能后，用户自助注册后即可正常下单消费，否则需要管理员审核后方可正常下单消费;（默认需要审核）
					</view>
					<switch
					@change="(val)=>{request('authorize',val.detail.value==false? 0:1)}"
					:checked="authorize==1" class="centers "
					/>
				</view>
			</view>
			<!-- end -->
			<!-- 允许不完善资料进入使用 -->
			<view class="box-list">
				<view class="title">
					<text selectable="true"  class="justify ">用户自助注册账号需要完善资料</text>
					<view class="tipss">
						用户使用微信快捷登录方式登入之后不再要求用户填写地址，手机号，姓名等资料即可进行,但是否需要再次审核仍受限于下方的【用户注册审核功能】功能影响;（默认需要完善资料）
					</view>
					<switch
					@change="(val)=>{request('buwanshan',val.detail.value==false? 1:0)}"
					:checked="buwanshan==0" class="centers "
					/>
				</view>
			</view>
			
		
			<!-- 关闭授信支付功能 -->
			<view class="box-list">
				<view class="title">
					<text selectable="true"  class="justify ">额度授信支付功能</text>
					<view class="tipss">
						关闭授信支付功能后，用户的余额为0将不能进行下单操作。开启后即使用户余额为0亦可正常下单消费，但是受限于用户设置里面的授信额度;（默认允许授信支付）
					</view>
					<switch
					@change="(val)=>{request('credit_payment',val.detail.value==false? 1:0)}"
					:checked="credit_payment==0" class="centers "
					/>
				</view>
			</view>
			<!-- 关闭授信支付功能 -->
			<view class="box-list">
				<view class="title">
					<text selectable="true"  class="justify ">微信在线支付功能</text>
					<view class="tipss">
						关闭微信在线支付功能后，用户的余额为0将不能进行下单操作。开启后用户可通过微信进行在线充值;（默认不允许微信在线支付）
					</view>
					<switch
					@change="(val)=>{request('weixin_pay',val.detail.value==false? 1:0)}"
					:checked="weixin_pay==0" class="centers "
					/>
				</view>
			</view>
			<!--  -->
			
			<!-- 微信公众号关注二维码 -->
			<view class="box-list">
				<view class="title">
					<text selectable="true"  class="justify ">公众号关注引导</text>
					<view class="tipss">
						打开此开关后，商城的首页将会出现一个悬浮按钮用于引导用户关注公众号，但需要配置好下面的【微信设置】->【公众号】相关配置项的;（默认隐藏）
					</view>
					<switch
					@change="(val)=>{request('weixin_gzh',val.detail.value==false? 1:0)}"
					:checked="weixin_gzh==0" class="centers "
					/>
				</view>
			</view>
			<!--  -->
			
			<!-- 关闭采购车 -->
			<view class="box-list">
				<view class="title">
					<text selectable="true"  class="justify ">采购单功能</text>
					<view class="tipss">
						关闭采购单功能，则一次无法增加多个商品。下单即购买;（默认开启采购单）
					</view>
					<switch
					@change="(val)=>{request('closeGoods',val.detail.value==false? 1:0)}"
					:checked="closeGoods==0" class="centers "
					/>
				</view>
			</view>
			<!-- end -->
			<!-- 回款设置 -->
			<view class="box-list">
				<view class="title">
					<text selectable="true"  class="justify ">回款设置</text>
					<view class="tipss">
						财务进行回款的时候允许负数输入;（默认不允许负数）
					</view>
					<switch
					@change="(val)=>{request('huikuan_setting',val.detail.value==false? 0:1)}"
					:checked="huikuan_setting==1" class="centers "
					/>
					<!-- 回款限制负数;0=不可；1=可 -->
				</view>
			</view>
			<!-- end -->
			

			<!-- 库存负数允许继续下单 -->
			<view class="box-list">
				<view class="title">
					<text selectable="true"  class="justify ">库存下单设置</text>
					<view class="tipss">
						库存不足以下单数量的时候允许继续下单;（默认允许）
					</view>
					<switch
					@change="(val)=>{request('createOrderAstrict',val.detail.value==false? 1:0)}"
					:checked="createOrderAstrictValue==0" class="centers "
					/>
				</view>
			</view>
			<!-- end -->
			
			<!-- 启动积分制 -->
			<view class="box-list">
				<view class="title">
					<text selectable="true"  class="justify ">启动积分制</text>
					<view class="tipss">
						不启用积分制则默认显示元，启用积分制则在商城显示的是积分；积分与人民币1:1;（默认不启用）
					</view>
					<switch
					@change="(val)=>{request('createOrderAstrict',val.detail.value==false? 1:0)}"
					:checked="points==0" class="centers "
					/>
				</view>
			</view>
			<!-- end -->
			
			<!-- 商城无库存的不显示 -->
			<view class="box-list">
				<view class="title">
					<text selectable="true"  class="justify ">显示库存为0的商品</text>
					<view class="tipss">
						商城无库存的商品将不显示给用户查看！（默认显示）
					</view>
					<switch
					@change="(val)=>{request('showUserMargin',val.detail.value==false? 1:0)}" 
					:checked="showUserMarginValue==0" class="centers "
					/>
					<!-- 0=只显示有库存的商品 1=不限制有误库存 -->
				</view>
			</view>
			<!-- 已购商品排序靠前 -->
			<view class="box-list">
				<view class="title">
					<text selectable="true"  class="justify ">已购商品排序靠前</text>
					<view class="tipss">
						开启此功能客户进行搜索商品的时候将会默认展示已购买的商品在前，便以用户进行快速复购。关闭此功能后将会按照默认的排序方式进行排序（默认开启）
					</view>
					<switch
					@change="(val)=>{request('productRepurchase',val.detail.value==false? 1:0)}" 
					:checked="productRepurchase==0" class="centers "
					/>
					<!-- 0=只显示有库存的商品 1=不限制有误库存 -->
				</view>
			</view>
			<!-- 虚拟下单后自动发货 -->
			<view class="box-list">
				<view class="title">
					<text selectable="true"  class="justify ">下单后自动发货</text>
					<view class="tipss">
						客户自助下单后自动进行发货、过账。一般常用于虚拟商品功能。如果商品存在卡密的清空下亦会同步进行卡密发放（默认不自动发货）
					</view>
					<switch
					@change="(val)=>{request('autoFahuo',val.detail.value==false? 1:0)}" 
					:checked="autoFahuoValue==0" class="centers "
					/>
					<!-- 0=只显示有库存的商品 1=不限制有误库存 -->
				</view>
			</view>
			<!-- 同步主站商品 -->
			<view class="box-list">
				<view class="title">
					<text selectable="true"  class="justify ">同步主站商品</text>
					<view class="tipss">
						两个仓库直接进行商品数据同步更新；一般用于虚拟商品系统
					</view>
					<view class="rightButttom" @click="$refs.setting_copy.open()">打开同步管理</view>
				</view>
			</view>
			<!-- 清除商品盘点的记录 -->
			<view class="box-list">
				<view class="title">
					<text selectable="true"  class="justify ">清除盘点记录</text>
					<view class="tipss margin-right">
						清除商品的盘点记录，清楚后商品的库存字段将会变成初始颜色。一般用于准备盘点前删除！
					</view>
					
					<view class=" centers  back_color search-but " @click="$common.noMultipleClicks('settingGoodsCheck',settingGoodsCheck)">
						清除
					</view>
				</view>
			</view>
			<!-- end -->
			<!-- 商品版本信息说明 -->
			<view class="box-list">
				<view class="title">
					<text selectable="true"  class="justify ">商品版本信息说明</text>
					<view class="tipss">
						设置后将会在商城商品详情页的底部显示
					</view>
					<view class="rightButttom" @click="$common.noMultipleClicks('articleCopyrightFun',articleCopyrightFun)">保存</view>
				</view>
				<view class="contentBox">
					
					<textarea class="textarea" type="text"
					maxlength="-1"
					:adjust-position="true"
					style="height: 300rpx ;width: 100%;"
					v-model="articleCopyright" 
					placeholder="版权声明：本站内容和资源来自互联网分享，本站仅做收集整理。本站仅提供信息存储空间服务，不拥有所有权，不承担相关法律责任。请仔细辨认内容的真实性，避免上当受骗。如发现本站有涉嫌抄袭侵权/违法违规的内容，请到我的页面的联系人工客服私聊举报，一经查实，本站将立刻删除。"
					placeholder-class="placeholder" >
					</textarea>
				</view>
			</view>
			<!-- end -->
			<!-- 客服微信 -->
			<view class="box-list">
				<view class="title">
					<text selectable="true"  class="justify ">微信客服二维码设置</text>
					<view class="tipss">
						设置后将会在用户端个人中心处的【联系客服】中出现。用户可以快速进行复制增加
					</view>
					<view class="rightButttom" @click="$common.noMultipleClicks('weixin_kefu',weixin_kefu)">设置</view>
				</view>
				<view class="contentBox">
					<view class="settingLeftTitle">状态：</view>
					<input class="ipu" placeholder="请输入内容" placeholder-class="placeholder-class" :value="weixin_kefu_content.length>2 ?'已设置':'未设置'" :disabled="true" />
				</view>
			</view>
			<!-- end -->
			<!-- 商品详情内页加购按钮标题 -->
			<view class="box-list">
				<view class="title">
					<text selectable="true"  class="justify ">商品详情内页加购按钮标题</text>
					<view class="tipss">
						可根据不同的商城属性进行自定义按钮标题;这里指的是商品详情的页面下的按钮；（默认:加入购物车）
					</view>
					<view class="rightButttom" @click="$common.noMultipleClicks('addGoodsBut',addGoodsBut)">保存</view>
				</view>
				<view class="contentBox">
					<view class="settingLeftTitle">按钮标题：</view>
					<input class="ipu" placeholder="请输入内容,如:加入购物车" placeholder-class="placeholder-class" v-model="addGoodsButTitle"/>
				</view>
			</view>
			
			<view class="box-list">
				<view class="title">
					<text selectable="true"  class="justify ">微信支付充值最低限制</text>
					<view class="tipss">
						当开启微信在线支付的时候可以设置此项为用户最低的充值金额，低于此金额则禁止支付。
					</view>
					<view class="rightButttom" @click="$common.noMultipleClicks('wechat_zuidi',wechat_zuidi)">保存</view>
				</view>
				<view class="contentBox">
					<view class="settingLeftTitle">按钮标题：</view>
					<input class="ipu" placeholder="请输入内容,如:加入购物车" placeholder-class="placeholder-class" v-model="wechat_zuidi_value" type="digit"/>
				</view>
			</view>
			
			<!-- 商品列表下的加购按钮标题 -->
			<view class="box-list">
				<view class="title">
					<text selectable="true"  class="justify ">商品列表下的加购按钮标题</text>
					<view class="tipss">
						可根据不同的商城属性进行自定义按钮标题;这里指的是商品列表旁边详情的按钮；这里的文字控制在4个字以内，太长会溢出页面（默认为空，+号图标）
					</view>
					<view class="rightButttom" @click="$common.noMultipleClicks('addGoodsButList',addGoodsButList)">保存</view>
				</view>
				<view class="contentBox">
					<view class="settingLeftTitle">按钮标题：</view>
					<input class="ipu" placeholder="请输入内容,如:加入购物车" placeholder-class="placeholder-class" v-model="addGoodsButListTitle"/>
				</view>
			</view>
			
			<!-- 商品列表下的加购按钮标题 -->
			<view class="box-list">
				<view class="title">
					<text selectable="true"  class="justify ">商城商品列表展示模式</text>
					<text class="tipss" selectable="true">
						可以输入【 row 或 column】任意的显示模式，
					</text>
					<view class="rightButttom" @click="$common.noMultipleClicks('displayMode',displayMode)">保存</view>
				</view>
				<view class="contentBox">
					<view class="settingLeftTitle">模式：</view>
					<input class="ipu" placeholder="请输入内容" placeholder-class="placeholder-class" v-model="displayModeValue"/>
				</view>
			</view>
			
			<!-- 安全IP设置 -->
			<view class="box-list">
				<view class="title">
					<text selectable="true"  class="justify ">安全IP设置</text>
					<view class="tipss">
						设置后仅允许以下IP进行访问系统、商城
					</view>
					<view class="rightButttom" @click="$common.noMultipleClicks('fun_IP',fun_IP)">保存</view>
				</view>
				<view class="contentBox">
					<view class="settingLeftTitle">外网IP：<text>输入公网IP</text></view>
					<input class="ipu" placeholder="请输入内容" placeholder-class="placeholder-class" v-model="IP.ip"/>
				
				</view>
			</view>
			<!-- end -->

			<!-- 仓库地图位置 -->
			<view class="box-list">
				<view class="title">
					<text selectable="true"  class="justify ">仓库所在的地图位置</text>
					<view class="tipss">
						设置后进行批量打印单据的时候后台会自动进行智能排单。排单逻辑为：根据用户的定位远近
					</view>
					<view class="rightButttom" @click="$common.noMultipleClicks('firm_latlng',firm_latlng)">保存</view>
				</view>
				
				<view class="contentBox" @click="open_tx_lbs()" style="cursor: pointer;">
					<view class="settingLeftTitle status0" >点击选择位置：{{position.firm.city}}</view>
				</view>
			
			</view>
			<!-- end -->

			<!-- 微信小程序设置 -->
			<view class="box-list">
				<!-- 功能 -->
				<view class="title">
					<text selectable="true"  class="justify ">微信设置</text>
					<view class="tipss">
						用于小程序的快速登陆，微信支付|不填写则默认使用系统提供的小程序进行使用。
					</view>
					<view class="settingLeftTitle status0">
						<text  selectable="true">
							把商户号、小程序AppID，公众号AppID 相互在后台进行绑定。可联系运维人员进行处理
						</text>
					</view>
					<view class="rightButttom" @click="$common.noMultipleClicks('fun_weixin',fun_weixin)">保存</view>
				</view>
				<!-- end -->
				<!-- 内容 -->
				<view class="contentBox">
					<view class="settingLeftTitle">小程序 AppID：<text>小程序路径:开发者管理</text></view>
					<input class="ipu" placeholder="请输入内容" placeholder-class="placeholder-class" v-model="weixin.appid_mp"/>
				</view>
				
				<view class="contentBox">
					<view class="settingLeftTitle">小程序 AppSecret：<text>小程序路径:开发者管理。需要在小程序->开发管理->开发设置中的【服务器域名、业务域名】处各填入：
					{{$common.baseUrl.host}}</text></view>
					<input class="ipu" placeholder="请输入内容" placeholder-class="placeholder-class" v-model="weixin.AppSecret_mp"/>
				</view>
				
				
				
				
				<view class="contentBox">
					<view class="settingLeftTitle">商户号 mchid：<text>直连商户的商户号，由微信支付生成并下发</text></view>
					<input class="ipu" placeholder="请输入内容" placeholder-class="placeholder-class" v-model="weixin.mchid"/>
				</view>
				
				<view class="contentBox">
					<view class="settingLeftTitle">商户号 apiKey：
						<text>https://pay.weixin.qq.com 帐户设置-安全设置-API安全-API密钥-设置API密钥</text>
						<text  selectable="true">
						需要在微信支付后台->产品中心->开发配置中的【JSAPI支付】处填入：
						【{{$common.baseUrl.host}}/h5/#/pages/public/pay/】【{{$common.baseUrl.host}}/h5/#/】
						</text>
						<text  selectable="true">
							需要在微信支付后台->产品中心->开发配置中的【Native支付】处填入：
							{{$common.baseUrl.host}}/api/class/weixinPay/notify.php
						</text>
					</view>
					<input class="ipu" placeholder="请输入内容" placeholder-class="placeholder-class" v-model="weixin.apiKey"/>
				</view>
				
				
				
				<view class="contentBox">
					<view class="settingLeftTitle">公众号 appid：<text>请求基础下单接口时请注意APPID的应用属性，例如公众号场景下，需使用应用属性为公众号的服务号APPID</text></view>
					<input class="ipu" placeholder="请输入内容" placeholder-class="placeholder-class" v-model="weixin.appid"/>
				</view>
				
				<view class="contentBox">
					<view class="settingLeftTitle">公众号 AppSecret：
						<text>appsecret:公众号的</text>
						<text  selectable="true">
						需要在服务号->设置与开发->账号设置->功能设置中的【业务域名、JS接口安全域名、网页授权域名】处各填入：
						{{$common.baseUrl.host}}
						</text>
					</view>
					<input class="ipu" placeholder="请输入内容" placeholder-class="placeholder-class" v-model="weixin.AppSecret"/>
				</view>
				
			</view>
			<!-- end -->

		</view>

	</view>
	<!-- 地图 -->
	<uni-popup ref="tx_lbs" type="center" title="选择地点">
		<iframe id="mapPage" width="100%" height="100%" frameborder=0
			:src="'https://apis.map.qq.com/tools/locpicker?search=1&type=1&key='+position.lbs_key+'&referer=myapp'">
		</iframe>
	</uni-popup>
	<!--地图 end -->
	<uni-popup ref="setting_copy" type="center" title="仓库数据复制工具" >
		<setting_copy ></setting_copy>
	</uni-popup>
	<firmList ref="firmList"></firmList>

	
</view>

</template>

<script>
	import setting_copy from "@/components/admin-components/setting_copy.vue"
	import firmList from "@/components/admin-components/firm.vue"
	export default{
		components: {
			setting_copy,firmList
		},
		name:'user_astrict',
		data(){
			return{
				position:{//坐标位置
					lbs_key:'',//地图配置
					firm:{
						city:'',
						longitude:'',//经度
						latitude:'',//纬度
					}
				},
				wechat_zuidi_value:0.01,//最低充值
				addGoodsButTitle:'',//加购按钮标题
				addGoodsButListTitle:'',
				displayModeValue:'',
				weixin_kefu_content:'',//微信客服内容
				articleCopyright:'',//版权说明
			
				
				hideSalesCountValue:'0',
				showUserMarginValue:'0',
				autoFahuoValue:'0',
				huikuan_setting:'',//回款负数设置
				addFirm:{
					appids:'',
					name:'',
					adminName:'',
					adminPassword:''
				},
				taobao:{
					tb_appKey:'',
					tb_appSecret:'',
					tb_adzoneId:'',
				},
				aliyun:{
					aly_accessKeyId:'',
					aly_accessKeySecret:'',
					aly_regionId:'',
					aly_instanceName:'',
				},
				baidu:{//百度
					app_id:'',
					app_key:'',
					app_secret:'',
					score:72,//相似度
				},
				weixin:{//小程序
					appid_mp:'',
					AppSecret_mp:'',
					mchid:'',
					apiKey:'',
					appids:'',
					AppSecret:'',
				},
				lbs:{//地图
					key:'',
				},
				deepseek:{
					key:'',
				},
				mp:{
					mp_paht:'',
					mp1_paht:'',
				},
				IP:{
					ip:''
				},
				goods_browse:'',//游客浏览
				closeGoods:'',//关闭采购单功能
				buwanshan:'',//不完善资料既可以使用
				goodsBrowseShowMoney:'',//游客账号可用查看价格
				
				adCardSwitch:'',//名片墙
				advertisementSwitch:"",//广告动态
				adGroupSwitch:'',//换群功能
				credit_payment:'',//授信支付功能开关
				weixin_pay:'',//开启微信支付
				weixin_gzh:'',//微信公众号关注引导
				productRepurchase:'',//已购商品排序在前
				authorize:'',//注册审核功能
				resData:{
					data:{}
				},
			
				
				createOrderAstrictValue:'',
				points:'',//积分启用
		
				global_frim_id:'',
				
			}
		},
		 // 此处定义传入的数据
		props: {
		},
		mounted(){
		},
		created() {
			var that = this
			this.config_export()
			//读取地图配置
			uni.getStorage({
				key:'lbs',
				success:(res)=>{
					that.position.lbs_key = res.data.key
				}
			})
		},
		methods:{
			
			addGoods(){
				var that = this
				uni.showModal({
					title:'通过复制其他仓库的商品来进行快速同步商品数据\n请注意此功能谨慎使用！建议先咨询后台管理人员',
					mask:true,
					editable:true,
					content:'',
					placeholderText:'请输入其他仓库的ID',
					success:(res)=>{
						if(res.confirm ){
							var card = res.content.trim();
							var value = card.split("\n");
							if(value.length==0){
								that.$common.showModal('提示',"未输入内容")
								return
							}
							that.$common.get_request(
								{
									type:'updateFirmGoods',
									sourceInput:value
								},
								(res)=>{
									that.$common.showModal('提示',res.msg)
								},()=>{},true,"","请不要关闭此窗口(更新中...)",0,180000
							);
						}
					}
				})
			},
			/**
			 * 弹出/关闭地图窗口
			*/
			open_tx_lbs(isclose=false){
				var that = this
				if(isclose==true ){
					this.$refs.tx_lbs.close()
					
					window.removeEventListener('message',that.fun_onLbs,false);
					return
				}
				this.$refs.tx_lbs.open()
				window.addEventListener('message', that.fun_onLbs, false);
			},
			/**
			 * 腾讯地图选择位置后的回调
			*/
			fun_onLbs(event){
				var that = this
				// 接收位置信息，用户选择确认位置点后选点组件会触发该事件，回传用户的位置信息
				if (event && event.data &&  event.data.module == 'locationPicker') {
					var loc = event.data;
					//防止其他应用也会向该页面post信息，需判断module是否为'locationPicker'
					if('我的位置' == loc.poiname){
						return
					}
					that.position.firm.city   = loc.poiname+"-"+loc.poiaddress
					console.log(loc.latlng)
					that.position.firm.latitude  = loc.latlng.lat
					that.position.firm.longitude = loc.latlng.lng
					that.open_tx_lbs(true)
				}
			},
			
			
			
			fun_aliyun(){
				var that = this
				var aly_accessKeyId = that.aliyun.aly_accessKeyId.trim()
				var aly_accessKeySecret = that.aliyun.aly_accessKeySecret.trim()
				var aly_instanceName = that.aliyun.aly_instanceName.trim()
				var aly_regionId = that.aliyun.aly_regionId.trim()
				
				if(aly_accessKeyId.length==0 || aly_accessKeySecret.length==0 || aly_instanceName.length==0 || aly_regionId.length==0 ){
					that.$common.toast("未完整填入信息，无法保存！")
					return
				}
					
				that.$common.get_request(
					{
						type:'send_aliyun',
						aly_accessKeyId:aly_accessKeyId,
						aly_accessKeySecret:aly_accessKeySecret,
						aly_instanceName:aly_instanceName,
						aly_regionId:aly_regionId,
					},
					(res)=>{
						that.$common.showModal('提示',res.msg)
					}
				);
				
			},
			
			fun_taobao(){
				var that = this
				var tb_adzoneId = that.taobao.tb_adzoneId.trim()
				var tb_appKey = that.taobao.tb_appKey.trim()
				var tb_appSecret = that.taobao.tb_appSecret.trim()
				
				if(tb_adzoneId.length==0 || tb_appKey.length==0 || tb_appSecret.length==0 ){
					that.$common.toast("未完整填入信息，无法保存！")
					return
				}
					
				that.$common.get_request(
					{
						type:'send_taobao',
						tb_adzoneId:tb_adzoneId,
						tb_appKey:tb_appKey,
						tb_appSecret:tb_appSecret,
					},
					(res)=>{
						that.$common.showModal('提示',res.msg)
					}
				);
				
			},

			fun_addFirm(){
				var that = this
				var appids = that.addFirm.appids.trim()
				var name = that.addFirm.name.trim()
				var adminName = that.addFirm.adminName.trim()
				var adminPassword = that.addFirm.adminPassword.trim()
				
				if(appids.length==0 || name.length==0 || adminName.length==0 ){
					that.$common.toast("未完整填入信息，无法保存！")
					return
				}
		
				that.$common.get_request(
					{
						type:'addFirm',
						appids:appids,
						name:name,
						adminName:adminName,
						adminPassword:adminPassword,
					},
					(res)=>{
						that.$common.showModal('提示',res.msg)
					}
				);
				
			},
			//读出配置
			config_export(){
				var that = this
				that.$common.get_request(
					{
						type:'config_export',
					},
					(res)=>{
						that.resData = res
						that.baidu = res.data.baidu
						that.weixin= res.data.weixin
						that.taobao= res.data.taobao
						that.aliyun= res.data.aliyun
						
						that.lbs   = res.data.lbs
						that.deepseek = res.data.deepseek
						that.mp    = res.data.qrcode
						that.IP    = res.data.ip
						that.weixin_kefu_content    = res.data.weixin_kefu_content
						that.articleCopyright = res.data.articleCopyright
						that.addGoodsButTitle = res.data.addGoodsButTitle
						that.wechat_zuidi_value = res.data.wechat_zuidi_value
						that.addGoodsButListTitle = res.data.addGoodsButListTitle
						that.displayModeValue = res.data.displayMode
						that.adCardSwitch = res.data.adCardSwitch
						that.advertisementSwitch = res.data.advertisementSwitch
						that.adGroupSwitch = res.data.adGroupSwitch
						that.goods_browse= res.data.goodsBrowse
						that.closeGoods = res.data.closeGoods
						that.buwanshan = res.data.buwanshan
						that.goodsBrowseShowMoney  = res.data.goodsBrowseShowMoney
						that.credit_payment = res.data.credit_payment
						that.weixin_pay = res.data.weixin_pay
						that.weixin_gzh = res.data.weixin_gzh
						that.productRepurchase = res.data.productRepurchase
						that.authorize = res.data.authorize
					
					
						that.huikuan_setting = res.data.huikuan_setting
						that.createOrderAstrictValue = res.data.createOrderAstrictValue
						that.points = res.data.points
					
						that.position.firm = res.data.firm
						that.showUserMarginValue = res.data.showUserMargin
						that.autoFahuoValue = res.data.autoFahuo
					}
				);
			},
			fun_deepseek(){
				var that = this
				var key = that.deepseek.key.trim()
				
				if(key.length==0){
					that.$common.toast("未完整填入信息，无法保存！")
					return
				}
				that.$common.get_request(
					{
						type:'deepseek_api',
						key:key,
					},
					(res)=>{
						that.$common.toast(res.msg)
					}
				);
			},
			//腾讯地图设置
			fun_lbs(){
				var that = this
				var key = that.lbs.key.trim()
				
				if(key.length==0){
					that.$common.toast("未完整填入信息，无法保存！")
					return
				}
				that.$common.get_request(
					{
						type:'lbs_sva',
						key:key,
					},
					(res)=>{
						that.$common.toast(res.msg)
					}
				);
			},
			//保存仓库位置
			firm_latlng(){
				var that = this
				
				if(that.position.firm.city.length==0){
					that.$common.toast("请点击下方红色的选择位置按钮后选择位置再试！")
					return
				}
				that.$common.get_request(
					{
						type:'firm_latlng',
						city:that.position.firm.city,
						latitude:that.position.firm.latitude,
						longitude:that.position.firm.longitude,
					},
					(res)=>{
						that.$common.toast(res.msg)
					}
				);
			},			
			request(type,value){
				
				var that = this
				that.$common.get_request(
					{
						type:type,
						value:value,
					},
					(res)=>{
						that.$common.toast(res.msg)
						if(type == 'hideSalesCount'){
							that.hideSalesCountValue = value
							
						}else if(type == 'showUserMargin'){
							that.showUserMarginValue = value
							
						}else if(type == 'autoFahuo'){
							that.autoFahuoValue = value
							
						}else if(type == 'createOrderAstrict'){
							that.createOrderAstrictValue = res.value
							
						}else if(type == 'points'){
							that.points = res.value
						}
						else if(type == 'huikuan_setting'){
							that.huikuan_setting = res.value
							
						}else if(type == 'goodsBrowse'){
							that.goods_browse = res.value
							
						}else if(type == 'adCardSwitch'){
							that.adCardSwitch = res.value
							
						}else if(type == 'advertisementSwitch'){
							that.advertisementSwitch = res.value
							
						}else if(type == 'adGroupSwitch'){
							that.adGroupSwitch = res.value
							
						}
						else if(type == 'closeGoods'){
							that.closeGoods = res.value
						}else if(type == 'goodsBrowseShowMoney'){
							that.goodsBrowseShowMoney = res.value
						}
						
						else if(type == 'buwanshan'){
							that.buwanshan = res.value
						}else if(type == 'credit_payment'){
							that.credit_payment = res.value
						}else if(type == 'weixin_pay'){
							that.$nextTick(()=>{
								that.weixin_pay = res.value
							})
						}else if(type == 'weixin_gzh'){
							that.$nextTick(()=>{
								that.weixin_gzh = res.value
							})
						}
						else if(type == 'productRepurchase'){
							that.productRepurchase = res.value
						}
						
						else if(type == 'authorize'){
							that.authorize = res.value
						}
						
					}
				);
			},
	
			addGoodsBut(){
				var that = this
				var value = that.addGoodsButTitle.trim()
				
				that.$common.get_request(
					{
						type:'addGoodsBut',
						value:value,
					},
					(res)=>{
						that.$common.toast(res.msg)
					}
				);
			},
			wechat_zuidi(){
				var that = this
				var value = that.wechat_zuidi_value.trim()
				
				that.$common.get_request(
					{
						type:'wechat_zuidi',
						value:value,
					},
					(res)=>{
						that.$common.toast(res.msg)
					}
				);
			},
			
			displayMode(){
				var that = this
				var value = that.displayModeValue.trim()
				
				that.$common.get_request(
					{
						type:'displayMode',
						value:value,
					},
					(res)=>{
						that.$common.toast(res.msg)
					}
				);
			},
			addGoodsButList(){
				var that = this
				var value = that.addGoodsButListTitle.trim()
				
				that.$common.get_request(
					{
						type:'addGoodsButList',
						value:value,
					},
					(res)=>{
						that.$common.toast(res.msg)
					}
				);
			},
			articleCopyrightFun(){
				var that = this
				var value = that.articleCopyright.trim()
				
				that.$common.get_request(
					{
						type:'articleCopyright',
						value:value,
					},
					(res)=>{
						that.$common.toast(res.msg)
					}
				);
			},
			weixin_kefu(){
				let that = this;
				var filePath = ''

				uni.chooseImage({
					count:1,
					sizeType: ['compressed'],
					success:(e)=>{
						if(e.tempFilePaths.length>0){
							filePath = e.tempFilePaths[0];
							that.$common.uploadFile(
								filePath,
								{type:'weixin_kefu'},
								(res)=>{
									that.weixin_kefu_content = "已设置"
								},
							)
						}
					},
				})
			},

			//IP设置
			fun_IP(){
				var that = this
				var ip = that.IP.ip.trim()
				
				that.$common.get_request(
					{
						type:'ip_sva',
						ip:ip,
					},
					(res)=>{
						that.$common.toast(res.msg)
					}
				);
			},





			settingGoodsCheck(){
				var that = this
				that.$common.get_request(
					{
						type:'settingGoodsCheck'
					},
					(res)=>{
						that.$common.toast(res.msg)
					
					}
				);
			},

			//微信小程序设置
			fun_weixin(){
				var that = this
				var appid_mp = that.weixin.appid_mp.trim()
				var AppSecret_mp = that.weixin.AppSecret_mp.trim()
				
				var mchid = that.weixin.mchid.trim()
				var apiKey = that.weixin.apiKey.trim()
				var appids = that.weixin.appid.trim()
				var AppSecret = that.weixin.AppSecret.trim()
				if(appid_mp.length==0 || AppSecret_mp.length==0 || mchid.length==0 || apiKey.length==0 || appids.length==0 || AppSecret.length==0 ){
					that.$common.toast("未完整填入信息，无法保存！")
					return
				}
				uni.showModal({
					content: '是否继续修改？继续修改将会清除所有用户的微信快捷登录缓存。(解决办法：用户需要重新进行一次快捷登录即可)',
					success: function (res) {
						if (res.confirm) {
							that.$common.get_request(
								{
									type:'weixin_sva',
									appid_mp:appid_mp,
									AppSecret_mp:AppSecret_mp,
									mchid:mchid,
									apiKey:apiKey,
									appids:appids,
									AppSecret:AppSecret,
								},
								(ret)=>{
									that.$common.toast(ret.msg)
								}
							);
						}
					}
				});
				
			},
			//百度云保存
			fun_baidu(){
				var that = this
				var app_id = that.baidu.app_id.trim()
				var app_key = that.baidu.app_key.trim()
				var app_secret = that.baidu.app_secret.trim()
				var score = parseFloat(that.baidu.score.trim())
				if(app_id.length==0 || app_key.length==0 || app_secret.length==0 ){
					that.$common.toast("未完整填入信息，无法保存！")
					return
				}
				if(score<=10){
					that.$common.toast("填入的相似度太低，无法保证精准度！")
					return
				}
				that.$common.get_request(
					{
						type:'baiduyun_sva',
						app_id:app_id,
						app_key:app_key,
						app_secret:app_secret,
						score:score,
					},
					(res)=>{
						that.$common.toast(res.msg)
					}
				);
			},
		}
	}
</script>

<style>
	.settingLeftTitle{
		display: flex;
		margin: auto 0px;
		justify-content: center;
		flex:1;
		flex-direction: column;
		margin: 5px;
		color:#333;
		font-size: 14px;
	}
	.settingLeftTitle text{
		margin-top: 5px;
		color:#999;
		font-size: 12px;
	}
	.contentBox{
		display: flex;
		margin: 5px auto;
		padding: 16px 0;
		border-bottom: 1px solid #f5f5f5;
		display: flex;
	}
	.contentBox .ipu{
		padding: 5px;
		border-radius: 8px;
		margin: auto 5px;
		min-width: 350px;
		border: solid 1px #ddd;
		font-size: 14px;
		flex-direction: column;
		display: flex;
		height: 100%;
		line-height: initial;
		min-height: initial;
	}


	.errorImage{
		width: 60px;
		height: 60px;
	}
	
	.textarea{
		height: 150px;
		min-width: 350px;
		border: solid 1px #d5d5d5;
		text-align: left;
		padding: 5px;
	}
</style>
